/**  
* @Title: CardController.java  
* @Description: TODO(用一句话描述该文件做什么)  
* @author 张鑫
* @phone 17561783855  
* @date 2019年5月15日  
*/
package com.fortune.rainshinesystem.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.system.CardModel;
import com.fortune.rainshinesystem.service.CardService;

/**  
* @ClassName: CardController  
* @Description: TODO(会员卡维护)  
* @author 张鑫
* @phone 17561783855
* @date 2019年5月15日  
*    
*/
@RestController
@RequestMapping("/card")
public class CardController {
	@Autowired
    private CardService cardService;
	
	@PostMapping("/addCard")
    public MsgModel addCard(@RequestBody CardModel model){
        return cardService.addCard(model);
    }
	
	@PostMapping("/updateCard")
    public MsgModel updateShop(@RequestBody CardModel model){
        return cardService.updateCard(model);
    }

    @PostMapping("/cardList")
    public MsgModel cardList(@RequestBody ParmsModel parms){
        return cardService.cardList(parms);
    }

    @PostMapping("/delCard")
    public MsgModel delShop(@RequestBody CardModel model){
        return cardService.delCard(model);
    }
    
    @PostMapping("/getAllCards")
    public List<CardModel> getAllCards(){
        return cardService.getAllCards();
    }
}
